package com.guomei.constans;
/**
 * Redis相关常量类
 * 定义Redis中使用的各种键前缀和常量
 */
public class RedisConstants {
    /**
     * 手机验证码相关常量
     */
    public static final String SMS_CODE_PREFIX = "sms:verifyCode:";

    /**
     * 手机验证码过期时间（秒）
     */
    public static final long SMS_CODE_EXPIRE_TIME = 300;

    /**
     * Access Token前缀
     */
    public static final String ACCESS_TOKEN_PREFIX = "jwt:access:";

    /**
     * Refresh Token前缀
     */
    public static final String REFRESH_TOKEN_PREFIX = "jwt:refresh:";

    /**
     * 用户信息前缀
     */
    public static final String USER_INFO_PREFIX = "user:info:";

    /**
     * Access Token过期时间（秒）
     */
    public static final long ACCESS_TOKEN_EXPIRE = 86400; // 24小时

    /**
     * Refresh Token过期时间（秒）
     */
    public static final long REFRESH_TOKEN_EXPIRE = 604800; // 7天

    public static final String WECHAT_ACCESS_TOKEN_KEY = "wechat:mp:access_token";
    public static final String WECHAT_QR_CODE_PREFIX = "wechat:mp:qrcode:";
    public static final String WECHAT_QR_CODE_SCANNED_PREFIX = "wechat:mp:qrcode:scanned:";
    public static final String WECHAT_QR_SCAN_PREFIX = "wechat:mp:qrscan:";
    
    /**
     * 支付状态缓存前缀
     */
    public static final String PAYMENT_STATUS_PREFIX = "payment:status:";
    
    /**
     * 支付状态缓存过期时间（秒）- 30分钟
     */
    public static final long PAYMENT_STATUS_EXPIRE = 1800;

    // 私有构造函数，防止实例化
    private RedisConstants() {
        throw new AssertionError("不能实例化常量类");
    }
}
